<template>
	<div>
		<p>{{height}}</p>
		<p @click="handleB">this is comB</p>
	</div>
</template>
<script type="text/javascript">
	export default {
		name:"comB",
		props:{
			height:{
				type:[String],
				default:"80px"
			}
		},
		methods:{
			handleB:function(){
				console.log("hb",this.height)
				this.bus.$emit("hb",this.height)
			},
			toA(){
				//这里试图更改props，但是props描述为单向，会直接抛出错误
        // this.height="130px",
        // this.$emit("toA",this.height)
        this.$emit("toA","130px")
			}
		}
	}
</script>
<style type="text/css" scoped>
 p{
    background-color:#888;
 }	

</style>